import { SphereCollider } from 'cc';
import { BoxCollider } from 'cc';
import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('Table')
export class Table extends Component {

    private boxCollider: BoxCollider = null;
    private sphereCollider: SphereCollider = null;

    protected onLoad(): void {
        this.boxCollider = this.node.getComponent(BoxCollider);
        this.sphereCollider = this.node.getComponent(SphereCollider);
    }

    start() {
        this.boxCollider.on("onCollisionEnter", this.boxColliderEnter, this);
        this.boxCollider.on("onCollisionExit", this.boxColliderExit, this);
    }

    boxColliderEnter(event: any) {
        // console.log("table enter");
    }

    boxColliderExit() {
        // console.log("table exit");
    }

    update(deltaTime: number) {

    }
}


